# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
_pkgname=daphne
pkgname="py3-$_pkgname"
pkgver=3.0.2
pkgrel=1
pkgdesc="HTTP, HTTP2 and WebSocket protocol server for ASGI and ASGI-HTTP"
url="https://github.com/django/daphne"
arch="noarch"
license="BSD-3-Clause"
depends="
	py3-twisted
	py3-autobahn
	py3-asgiref
"
checkdepends="
	py3-hypothesis
	py3-cryptography
	py3-pytest
	py3-pytest-asyncio
	py3-pytest-runner
"
makedepends="py3-setuptools_scm"
source="
	https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
	0001-pytest-runner-extra.patch
"
options="!check" # tests attempt to build checkdepends
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --root "$pkgdir"
}

sha512sums="
d21afa16aeed70194f281bc6b9192342cd2af47a966a53f922c81dbce5333e6a8824f197c7ca03fecd020d3449a67ccd2381b2d8f0604e77fbbe0b512e7ca2e8  daphne-3.0.2.tar.gz
0db7a1ef3ddecfbe23952b74ae88a8b2fa6b4204670bb19b6e30b19494417a408c9967928fb4678271873af8c60699a62f5b33f199dec0bc849a8c173fa79aad  0001-pytest-runner-extra.patch
"
